import { createRouter,createWebHashHistory,createWebHistory } from "vue-router";

 export default createRouter({
    history:createWebHistory(),//决定路由模式
    routes:[//路由配置
        {
            path:"/",
            redirect:"/Login"
        },
        {
           path:"/Login" ,
           component:()=>import("../views/Login.vue")//注册页
        },

        {
           path:"/Admin" ,
           name:"Admin" ,
           component:()=>import("../views/Admin/Index.vue"),//注册页
         //   children:[
         //    {
         //       path:"List",
         //       component:()=>import("../views/Admin/Banner/List.vue")
         //    },
         //    {
         //       path:"Add",
         //       component:()=>import("../views/Admin/Banner/Add.vue")
         //    },
         //    {
         //       path:"renList",
         //       component:()=>import("../views/Admin/Admin/renList.vue")
         //    },
         //    {
         //       path:"renAdd",
         //       component:()=>import("../views/Admin/Admin/renAdd.vue")
         //    },
         //    {
         //       path:"shoppylist",
         //       component:()=>import("../views/Admin/Shoppy/shoppylist.vue")
         //    },
         //    {
         //       path:"shoppyye",
         //       component:()=>import("../views/Admin/Shoppy/shoppyye.vue")
         //    },
         //    {
         //       path:"commodity",
         //       component:()=>import("../views/Admin/commodity/commodity.vue")
         //    },
         //    {
         //       path:"user",
         //       component:()=>import("../views/Admin/commodity/user.vue")
         //    },
         //    {
         //       path:"home",
         //       component:()=>import("../views/Admin/Myhome/home.vue")
         //    },
         //   ]
        },
    ]
 })